﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
using FanaticRock.Events;

namespace FanaticRock.ViewModels
{
    // MainViewModel_TrayToolWindowPart
    public partial class MainViewModel
    {
        #region commands

        [RelayCommand]
        public void CloseTrayToolWindow()
        {
            var appMessageEventArgs = new AppMessageEventArgs(AppMessageEventArgs.WindowEnum.CloseTrayToolWindow);
            WeakReferenceMessenger.Default.Send(appMessageEventArgs);
        }

        [RelayCommand]
        public void CloseTrayToolWindowThenBackToMainWindow()
        {
            var appMessageEventArgs = new AppMessageEventArgs(AppMessageEventArgs.WindowEnum.MainWindow);
            WeakReferenceMessenger.Default.Send(appMessageEventArgs);
        }

        [RelayCommand]
        public void OpenTrayToolWindowWhileCloseMainWindow()
        {
            var appMessageEventArgs = new AppMessageEventArgs(AppMessageEventArgs.WindowEnum.TrayToolWindow);
            WeakReferenceMessenger.Default.Send(appMessageEventArgs);
        }

        #endregion

    }
}
